#include "public.h"

void get_signal(int signo) {
	switch(signo) {
		case 1:
			print("Get a signal -- SIGHUP"); break;
		case 2:
			print("Get a signal -- SIGINT"); break;
		case 3:
			print("Get a signal -- SIGQUIT"); break;
	}
}

void main() {
	printf("process is %d\n", getpid());
	signal(SIGHUP, get_signal);
	signal(SIGINT, get_signal);
	signal(SIGQUIT, get_signal);
	for(;;);
	return;
	//print("please input a num: ");
	//getchar();
	//print("you have input a num.");
}
